//#pragma once

double *dvector(long nl, long nh);
//double *dvector(int nl, int nh);
void free_dvector(double *m, long nl, long nh);

int *ivector(long nl, long nh);                      //新增
void free_ivector(int *m, long nl, long nh);         //新增
double ***dvector_3d(long nl, long nh);              //新增
void free_dvector_3d(double ***m, long nl, long nh); //新增

double **dmatrix(long nrl, long nrh, long ncl, long nch);
void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch);
void mat_add(double **a, double **b, double **c, int xl, int xr, int yl, int yr);
void zero_vector(double *a, int xl, int xr);
void zero_matrix(double **a, int xl, int xr, int yl, int yr);
void mat_copy(double **a, double **b, int xl, int xr, int yl, int yr);
void vec_copy(double *a, double *b, int xl, int xr);
void mat_sub(double **a, double **b, double **c, int nrl, int nrh, int ncl, int nch);
double vec_max(double *a, int nrl, int nrh);
double vec_min(double *a, int nrl, int nrh);
double mat_max(double **a, int nrl, int nrh, int ncl, int nch);

